package com.detooa.detooa.config;

import java.io.IOException;
import java.util.Properties;

import com.detooa.detooa.utils.PropertiesUtils;

import lombok.extern.log4j.Log4j2;

/**
 * 飞致云配置类
 */
@Log4j2
public class DataEaseConfig {

    public final static String deBaseUrl;// = "http://10.10.10.205:80";
    public final static String deWwwBaseUrl;// 外网地址// = "http://10.10.10.205:80";

    public final static String deAccessKey;// = "26CJSvQot5LA2Uyt";
    public final static String deSecretKey;// = "gZOxoK5j9HaDzK7K";

    static {
        Properties properties = new Properties();
        try {
            properties = PropertiesUtils.readProperties("de.properties");
        } catch (IOException e) {
            log.error("DataEase初始化失败...");
            e.printStackTrace();
        }
        deBaseUrl = properties.getProperty("de.base_url");
        deWwwBaseUrl = properties.getProperty("de.www_base_url");
        deAccessKey = properties.getProperty("de.access_key");
        deSecretKey = properties.getProperty("de.secret_key");
        if (null == deBaseUrl || null == deWwwBaseUrl || null == deAccessKey || null == deSecretKey) {
            log.error("DataEaseConfig初始化失败...");
        }else {
            log.info("DataEaseConfig初始化成功...");  
        }
        
    }
}
